package group2assignone.view.manager;

import group2assignone.model.Person;
import java.awt.*;
import javax.swing.*;

/**
 *
 * @author group2
 */
public class ManagerLoginView extends JFrame {

    private JButton login = new JButton("Login");
    private JTextField username = new JTextField(25);
    private JTextField password = new JTextField(25);
    private JLabel usernamePrompt = new JLabel("Username:");
    private JLabel passwordPrompt = new JLabel("Password:");

    /**
     *
     */
    public ManagerLoginView() {
        getContentPane().setLayout(new FlowLayout());
        getContentPane().add(usernamePrompt);
        getContentPane().add(username);
        getContentPane().add(passwordPrompt);
        getContentPane().add(password);
        getContentPane().add(login);
    }

    /**
     *
     * @param p
     */
    public void loadDetails(Person p) {
        //Wait for login to be pressed -> get info from boxes
        //Store entered username and password in Person p.
    }

    /**
     *
     * @param result
     */
    public void setLoginResult(boolean result) {
        //If result is true, load new UI else reset and display error message.
    }
}
